home *** CD-ROM | disk | FTP | other *** search
/ Just Call Me Internet / Just Call Me Internet.iso / com / bbs / server / octps074 / script / language.scr < prev    next >
Encoding:
Text File  |  1995-03-04  |  2.8 KB  |  92 lines

  1. /*
  2.  * Octopus, The Atari ST(e)/TT/Falcon GEM/TOS Bulletin Board System
  3.  * written by me (Koos Kuil) on FidoNet: 2:282/397, NeST: 90:500/103
  4.  *
  5.  * Example English OctoScript file written on 03 March 1995 by
  6.  * Koos Kuil to demostrate easy language selecting.
  7.  * ------------------------------------------------------------------
  8.  * LANGUAGE.SCR        Loading language files, more languages can be
  9.  *                  set easyely later.
  10.  *
  11.  * We are using some userkeys to select the right language, for 8
  12.  * languages we can use 3 bits.  For more languages more bits are
  13.  * required.   In this example userkey 1, 2 and 3 are used.
  14.  *
  15.  * :ask_language    Asks the user for a language, menu ASKLANG
  16.  *                  is send in Convert mode to show possibilitys.
  17.  * :get_language    Loads the setted language, when not available
  18.  *                  no language is loaded so you can use it without
  19.  *                  changes if you don't want to do this.
  20.  *
  21.  * Format:        (1)    0  0  0   English    OCTOPUS.ENG
  22.  *              (2) 0  0  1   German    OCTOPUS.GER
  23.  *              (3) 0  1  0   Dutch        OCTOPUS.NED
  24.  *              (4) 0  1  1   Svenska    OCTOPUS.SWE
  25.  *              (5) 1  0  0   Polish    OCTOPUS.POL
  26.  *              (6) 1  0  1   Italian    OCTOPUS.ITA
  27.  *              (7) 1  1  0   French    OCTOPUS.FRE
  28.  *              (8) 1  1  1   Fries     OCTOPUS.FRI
  29.  *                  ^  ^  ^
  30.  *                  |  |  +-- UserKey 1
  31.  *                  |  +----- UserKey 2
  32.  *                  +-------- Userkey 3
  33.  */
  34. :ask_language
  35. ClrUserKey 1    /* Reset current language to English */
  36. ClrUserKey 2
  37. ClrUserKey 3
  38. Do  
  39.   Convert AskLang
  40.   DoChoice
  41.     SelectChoice
  42.        Case 2    SetUserKey 1
  43.        Case 3    SetUserKey 2
  44.        Case 4    SetUserkey 1    SetUserKey 2
  45.        Case 5    SetUserKey 3
  46.        Case 6    SetUserKey 1    SetUserKey 3
  47.        Case 7     SetUserKey 2    SetUserKey 3
  48.        Case 8    SetUserKey 1    SetUserKey 2     SetUserKey 3
  49.     EndSelect
  50.   EnddoChoice 12345678
  51. Enddo 12345678
  52. Gosub get_language
  53. Return
  54.  
  55. /* Load the selected language, in Octopus v0.63 it's not
  56.  * yet possible to calculate so we are doing it a little 
  57.  * bit on the not usable way but it works correctly in
  58.  * practical environment.
  59.  */
  60. :get_language
  61. IfUserKey 1
  62.   IfUserKey 2
  63.     IfUserKey 3
  64.        LoadLanguage OCTOPUS.FRI        /* 7 */
  65.     Else    
  66.        LoadLanguage OCTOPUS.SWE        /* 3 */
  67.     Endif
  68.   Else
  69.     IfUserKey 3
  70.        LoadLanguage OCTOPUS.ITA        /* 6 */
  71.     Else
  72.        LoadLanguage OCTOPUS.GER        /* 1 */
  73.     Endif
  74.   Endif
  75. Else
  76.   IfUserKey 2
  77.     IfUserKey 3
  78.        LoadLanguage OCTOPUS.FRE        /* 5 */
  79.     Else
  80.        LoadLanguage OCTOPUS.NED        /* 2 */
  81.     Endif
  82.   Else
  83.     IfUserKey 3
  84.        LoadLanguage OCTOPUS.POL        /* 4 */
  85.     Else
  86.        LoadLanguage OCTOPUS.ENG        /* 0 */
  87.     Endif
  88.   Endif
  89. Endif
  90. Return
  91.  
  92. /* End LANGUAGE.SCR */